$(function () {
    load();
})

function load() {
    $.post("/Mmanufacture.do/mManufactureWZY_SH", function (sdata) {
        let str = "     <tr class=\"table-success\">\n" +
            "            <th>生产派工单编号</th>\n" +
            "            <th>产品编号</th>\n" +
            "            <th>产品名称</th>\n" +
            "            <th>数量</th>\n" +
            "            <th>出库单编号合集</th>\n" +
            "            <th>登录时间</th>\n" +
            "            <th>操作</th>\n" +
            "        </tr>\n";
        $.each(sdata, function (index,item) {
            let s = JSON.stringify(item);
            str += "     <tr >\n" +
                "            <td>" + item.manufactureid + "</td>\n" +
                "            <td>" + item.productid + "</td>\n" +
                "            <td>" + item.productname + "</td>\n" +
                "            <td>" + item.amount + "</td>\n" +
                "            <td></td>\n" +
                "            <td>" + item.registertime + "</td>\n" +
                "            <td><input type='button' class=\"btn btn-primary\" value='审核' onclick='cha_SH(" + s+ ")'/> </td>\n" +
                "        </tr>\n";
        })
        $("#tableSH").html(str);
    })
}

function cha_SH(op) {
    localStorage.setItem("mManufactureSH",JSON.stringify(op));
    location.href="../../wen_zhi_yi/mManufacturekaishiSH.html";
}